<template>
  <div class="table">
    <h2>{{ num == 1 ? "各分县局统计" : "各支队统计" }}</h2>
    <div>
      <el-table
        style="width: 100%"
        :header-cell-style="{ background: '#ebeef5' }"
        :data="list"
        size="medium"
      >
        <el-table-column
          prop="county"
          :label="num == 1 ? '各分县局' : '各科队'"
        >
        </el-table-column>
        <el-table-column prop="month" label="本月用稿"> </el-table-column>
        <el-table-column prop="year" label="本年用稿"> </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  name: "table",
  data() {
    return {
      list: [
        { county: "新城", month: "0", year: "0", id: "1" },
        { county: "碑林", month: "0", year: "0", id: "2" },
        { county: "莲湖", month: "1", year: "1", id: "3" },
        { county: "雁塔", month: "0", year: "0", id: "4" },
        { county: "未央", month: "0", year: "0", id: "5" },
      ],
    };
  },
  computed: {
    num() {
      return this.$route.query.num;
    },
  },
};
</script>

<style lang="scss" scoped>
.table {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  h2 {
    text-align: center;
    margin: 40px;
    width: 70%;
    font-size: 0.3rem;
    font-weight: 300;
  }
  div {
    width: 70%;
    margin: 20px;
  }
}
</style>
